//第1关 类的继承

package step1;

import java.util.Scanner;

class Person {
    /********** Begin **********/
    // 自行设计类的实现
	private String name;
	private String sex;
	private int age;
	
	public Person() {
		
	}

	public Person(String name, String sex, int age) {
		this.name = name;
		this.sex = sex;
		this.age = age;
	}

	@Override
	public String toString() {
		return name + "," + sex + "," + age + ",";
	}
	
	
	/********** End **********/	                                                     
}

class Student extends Person {
    /********** Begin **********/
    // 自行设计类的实现
	private String no;
	private String enter;
	private String major;
	
	public Student(String name, String sex, int age, String no, String enter, String major) {
		super(name,sex,age);
		this.no = no;
		this.enter = enter;
		this.major = major;
	}

	@Override
	public String toString() {
		return super.toString() + no + "," + enter + "," + major;
	}
	
	/********** End **********/	                                                     
}

class Teacher extends Person {
    /********** Begin **********/
    // 自行设计类的实现
	private String pro;
	private String department;
	
	public Teacher(String name, String sex, int age, String pro, String department) {
		super(name,sex,age);
		this.pro = pro;
		this.department = department;
	}

	@Override
	public String toString() {
		return super.toString() + pro + "," + department;
	}
	
	/********** End **********/		                                                     
}

public class Lab3_1 {
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		Student student = new Student(sc.next(), sc.next(), sc.nextInt(), sc.next(), sc.next(), sc.next());
		Teacher teacher = new Teacher(sc.next(), sc.next(), sc.nextInt(), sc.next(), sc.next());
		System.out.println("学生基本信息为:" + student);
		System.out.println("教师的信息为:" + teacher);
		sc.close();	                                                     
	}
}	
